﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CustomerSearch.aspx.cs"
    Inherits="Web.CrmContacto.App.CustomerSearch" EnableEventValidation="false" %>

<%@ Import Namespace="Web.Framework.Translate" %>
<%@ Register assembly="Web.Framework" namespace="Web.Framework.All" tagprefix="cc1" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="/Scripts/App/CustomerSearch.js?v=1" type="text/javascript"></script>
    <link href="/Styles/App/CustomerSearch.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/App/SearchProduct.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2 runat="server" id="TitleNavContext" visible="false">
        <asp:Label ID="lblContexto" runat="server" Text=""></asp:Label>
    </h2>
    <h2>
        <asp:Literal ID="Literal1" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.SearchContacto.BusquedaTitulo"]%>' />
        <img width="15px" height="15px" id="imgExpand" class="imgExpand" src="/Images/icon_blockexpanded.png"
            onclick="window.AppCommonObj.toggleVisibility(this.id, 'resultDiv');" alt="" />
        <span class="clear"></span>
    </h2>
    <div class="editionContainerFilter" id="resultDiv">
        <div class="clear">
        </div>       
        <p>
            <span class="title2">
                <asp:Literal ID="Literal2" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Nombre"]%>' />:</span>
            <asp:TextBox ID="txtNombre" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                title='<%$ Code:  LocalizationProvider.Instance["Contacto.Nombre.Tooltip"] %>'></asp:TextBox>
        </p>
        <p>
            <span class="title2 secondColumn">
                <asp:Literal ID="Literal3" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Apellido"]%>' />:</span>
            <asp:TextBox ID="txtApellido" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                title='<%$ Code:  LocalizationProvider.Instance["Contacto.Apellido.Tooltip"] %>'></asp:TextBox>
        </p>
         <p class="lstp">
              <span class="titleCheck titleCheckA">
                <asp:Literal ID="Literal46" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.SearchContacto.IncluirConEmail"]%>' />:</span>
                <cc1:TriStateCheckBox EnableViewState="True" ID="tckConEmail" CssClass="threestatecheck threestatecheckCtrl" ImagePath="/Images/Controls/ThreeState/" runat="server"  />            
              <span class="titleCheck titleCheckB">
                <asp:Literal ID="Literal470" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.SearchContacto.IncluirConDocumento"]%>' />:</span>
                <cc1:TriStateCheckBox EnableViewState="True" ID="tckConDocumento" CssClass="threestatecheck threestatecheckCtrl" ImagePath="/Images/Controls/ThreeState/" runat="server"  />            
              <span class="titleCheck titleCheckB">
                <asp:Literal ID="Literal480" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.SearchContacto.IncluirConVentas"]%>' />:</span>
              <cc1:TriStateCheckBox EnableViewState="True" ID="tckConVentas" CssClass="threestatecheck threestatecheckCtrl" ImagePath="/Images/Controls/ThreeState/" runat="server"  />
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title2">
                <asp:Literal ID="Literal4" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Email"]%>' />:</span>
            <asp:TextBox ID="txtEmail" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                title='<%$ Code:  LocalizationProvider.Instance["Contacto.Email.Tooltip"] %>'></asp:TextBox>
        </p>
        <p class="lstp">
            <span class="title2 secondColumn masfiltrosp">
                <asp:Literal ID="Literal5" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.SearchContacto.MasFiltros"]%>' />:</span>
            <asp:ListBox ID="lstMasFiltros" runat="server" CssClass="lst checkboxList" SelectionMode="Multiple"
                ClientIDMode="Static"></asp:ListBox>
        </p>
        <div class="divp">
            <span class="title2 secondColumn">
                <asp:Literal ID="Literal19" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CantidadDeRegistros"]%>' />:</span>
               <asp:DropDownList ID="cboRegistros" runat="server" CssClass="cbo" ClientIDMode="Static">
                </asp:DropDownList>
        </div>
        <div class="clear">
        </div>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroDocumento" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img1" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroDocumento');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal37" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal6" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.TipoDocumento"]%>' />:</span>
                <asp:ListBox ID="lstTipoDocumento" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
            <p>
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal7" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Documento"]%>' />:</span>
                <asp:TextBox ID="txtDNI" runat="server" CssClass="inputs" ClientIDMode="Static" title='<%$ Code:  LocalizationProvider.Instance["Contacto.Documento.Tooltip"] %>'></asp:TextBox>
            </p>
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroCumpleanos" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img2" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroCumpleanos');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal38" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal8" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Cumpleanios"]%>' />:</span>
                <asp:ListBox ID="lstCumpleDia" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
                <asp:ListBox ID="lstCumpleMes" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
                <asp:ListBox ID="lstCumpleAnio" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
              <div class="clear">
            </div>
             <p>
                <span class="title2">
                    <asp:Literal ID="Literal35" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CumpleDesde"]%>' />:</span>
                <asp:TextBox ID="txtCumpleDesde" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
            <p>
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal36" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CumpleHasta"]%>' />:</span>
                <asp:TextBox ID="txtCumpleHasta" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
            <div class="clear">
            </div>
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroListaDistribucion" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img3" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroListaDistribucion');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal39" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal9" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["ListaDeDistribucion"]%>' />:</span>
                <asp:ListBox ID="lstListaDistribucion" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroEstados" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img4" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroEstados');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal40" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal10" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Estado"]%>' />:</span>
                <asp:ListBox ID="lstEstado" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
            <p class="lstp">
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal11" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.EstadoEmail"]%>' />:</span>
                <asp:ListBox ID="lstEstadoEmail" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
            <div class="clear">
            </div>
             <div class="divp">
                <span class="title2">
                    <asp:Literal ID="Literal32" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Contacto.Sexo"]%>' />:</span>
                <asp:DropDownList ID="cboSexo" runat="server" CssClass="cbo" ClientIDMode="Static">
                </asp:DropDownList>
            </div>
             <p class="lstp">
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal13" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bitacora.TipoRegistroBitacora"]%>' />:</span>
                <asp:ListBox ID="lstTipoRegistroBitacora" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
            <div class="clear">
            </div>
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroPais" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img5" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroPais');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal41" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
             <div class="divp">
                <span class="title2">
                    <asp:Literal ID="Literal12" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Pais"]%>' />:</span>
                <asp:DropDownList ID="cboPaisSearch" runat="server" CssClass="cbo" ClientIDMode="Static">
                </asp:DropDownList>
            </div>
            <p class="lstp" id="parrafoProvincia">
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal44" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Provincia"]%>' />:</span>
                <asp:ListBox ID="lstProvincia" runat="server" CssClass="lst searchLst"  SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>                
            </p>            
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroCategorias" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img6" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroCategorias');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal42" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal14" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Categorias"]%>' />:</span>
                <asp:ListBox ID="lstCategorias" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroDatosDeVenta" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img id="img7" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroDatosDeVenta');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal43" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p>
                <span class="title2">
                    <asp:Literal ID="Literal15" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Factura.NroFactura"]%>' />:</span>
                <asp:TextBox ID="txtFactura" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
            <p class="lstp">
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal49" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta.Outlet"]%>' />:</span>                
                    <asp:DropDownList ID="cboTipoPdv" runat="server" ClientIDMode="static" CssClass="cbo">
                    </asp:DropDownList>
            </p>
            <p class="lstp">
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal16" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta"]%>' />:</span>
                <asp:ListBox ID="lstPtoVtas" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
            <div class="clear">
            </div>
            <p>
                <span class="title2">
                    <asp:Literal ID="Literal17" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.FechaCompraDesde"]%>' />:</span>
                <asp:TextBox ID="txtFechaCompraDesde" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
            <p>
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal18" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.FechaCompraHasta"]%>' />:</span>
                <asp:TextBox ID="txtFechaCompraHasta" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
              <div class="clear">
            </div>
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal33" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Venta.Vendedor"]%>' />:</span>
                <asp:ListBox ID="lstVendedor" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
               <div class="clear">
            </div>
             <p class="lstp">
            <span class="title2">
                <asp:Literal ID="Literal47" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["VentaCampanaText"]%>' />:</span>
            <asp:ListBox ID="lstAccionMarketing" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                ClientIDMode="Static"></asp:ListBox>
        </p>
           <div class="clear">
            </div>
            <%--<p>
                <span class="title2">
                    <asp:Literal ID="Literal45" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Producto"]%>' />:</span>              
                    <asp:TextBox ID="txtProductoSearch" runat="server" CssClass="inputs" ClientIDMode="Static" ></asp:TextBox>                    
                    <img src="/Images/repetir.png" id='imgProductoSearchForceMenu' alt='search image' />
            </p>
            <div class="clear">
            </div>--%>
            <p>
                <span class="title2">
                    <asp:Literal ID="Literal45" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Producto"]%>' />:</span>              
                    <asp:TextBox ID="txtProductoMultipleSearch" runat="server" CssClass="inputs inputlong" ClientIDMode="Static" ></asp:TextBox>                    
                    <img src="/Images/consulta.png" id='imgProductoSearchForceMenu' alt='search image' />
            </p>
            <div class="clear">
            </div>
            <p>
                <span class="title2">
                    <asp:Literal ID="Literal48" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.LetraTemporada"]%>' />:</span>
                <asp:TextBox ID="txtProductoTemporadaLetra" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
              <div class="clear">
            </div>
            <p runat="server" id="pColor">
            <span class="title2">
                <asp:Literal ID="Literal51" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.ProductoSearch.CodigoColorProducto"]%>' />:</span>
            <asp:TextBox ID="txtProductoCodigoColor" runat="server" ClientIDMode="Static" CssClass="inputs inputlong"
                title='<%$ Code: LocalizationProvider.Instance["Bo.ProductoSearch.CodigoColorProducto"]%>'></asp:TextBox>
        </p>
        <div class="clear">
        </div>
             <p>
            <span class="title2">
                <asp:Literal ID="Literal50" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.ProductoSearch.CodigoTalleProducto"]%>' />:</span>
            <asp:TextBox ID="txtProductoCodigoTalle" runat="server" ClientIDMode="Static" CssClass="inputs inputlong"
                title='<%$ Code: LocalizationProvider.Instance["Bo.ProductoSearch.CodigoTalleProducto"]%>'></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        </asp:Panel>       
        <div class="clear">
        </div>
        <asp:Panel ID="pnlFiltroCreacion" ClientIDMode="Static" runat="server" CssClass="pnlFiltro">
        <img  id="imgPnlFiltroCreacion" width="15px" height="15px" onclick="javascript:window.CustomerSearchObj.closePnlFilter('pnlFiltroCreacion');"  class="imgCloseFiltroPanel" src="/Images/eliminar.png" alt="imgClose" title="<asp:Literal ID="Literal500" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CerrarFiltro"]%>' />"  />
            <p>
                <span class="title2">
                    <asp:Literal ID="Literal28" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.FechaCreadoDesde"]%>' />:</span>
                <asp:TextBox ID="txtFechaCreadoDesde" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
            <p>
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal29" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.FechaCreadoHasta"]%>' />:</span>
                <asp:TextBox ID="txtFechaCreadoHasta" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
            </p>
            <div class="clear">
            </div>
            <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal31" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.Origen"]%>' />:</span>
                <asp:ListBox ID="lstOrigenContacto" runat="server" CssClass="lst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>            
            <p class="lstp" id="pOrigenPuntoVenta">
                <span class="title2 secondColumn">
                    <asp:Literal ID="Literal30" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.OrigenPuntoVenta"]%>' />:</span>
                <asp:ListBox ID="lstOrigenPuntoDeVenta" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
             <div class="clear">
            </div>
             <p class="lstp">
                <span class="title2">
                    <asp:Literal ID="Literal34" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Auditoria.UsuarioCreador"]%>' />:</span>
                <asp:ListBox ID="lstUsuarioCreador" runat="server" CssClass="lst searchLst" SelectionMode="Multiple"
                    ClientIDMode="Static"></asp:ListBox>
            </p>
            <div class="clear">
            </div>
        </asp:Panel>
        <div class="clear">
        </div>
        <asp:LinkButton ID="lnkBuscar" runat="server" OnClick="lnkBuscar_Click" ClientIDMode="Static"  > <%-- OnClientClick="javascript:return window.CustomerSearchObj.PreSearch();"--%>
            <asp:Literal ID="Literal20" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdBuscar"]%>' /></asp:LinkButton>
        <a href="#" onclick="javascript:window.CustomerSearchObj.LimpiarFiltros(); return false;">
            <asp:Literal ID="Literal21" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdLimpiar"]%>' /></a>
        <div class="clear">
        </div>
    </div>
    <h2>
        <asp:Image Width="15px" Height="15px" ID="imgExpandResults" CssClass="imgExpand"
            ImageUrl="/Images/icon_blockcollapsed.png" runat="server" ClientIDMode="Static"
            alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlResults');" />
        <asp:Literal ID="Literal22" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.ListadoDeClientes"]%>' />
        <asp:Label ID="lblSearchResult" runat="server" Text="" CssClass="lblSearchResult"></asp:Label>
    </h2>
    <asp:Panel ID="pnlResults" CssClass="editionContainerForGrid" runat="server" ClientIDMode="Static">
        <a id="A1" href="javascript:void()" onclick="window.CustomerSearchObj.showDialogCmd(); return false;"
            class="lnkCmd" runat="server">
            <asp:Literal ID="Literal23" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.AplicarOperacionMasiva"]%>' /></a>
        <a class="aconfigurarColumnas" onclick="javascript:$('#sorteableColumnsDiv').dialog('open');"
            href="javascript:void();">
            <asp:Literal ID="Literal24" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.ConfigurarColumnas"]%>' /></a>            
        <div class="clear">
        </div>
        <asp:LinkButton ID="lnkAsociar" runat="server" CssClass="lnkCmd" ClientIDMode="Static"></asp:LinkButton>
        <asp:ObjectDataSource ID="CustomerObjectDs" runat="server" TypeName="Web.Framework.Search.GridViewSearchObjectDataSource"
            SortParameterName="sortExpression" SelectMethod="GetObjects" SelectCountMethod="TotalNumberOfGetObjects"
            EnablePaging="True" OnObjectCreating="CustomerObjectDs_ObjectCreating" OnSelected="GridCustomer_Selected">
        </asp:ObjectDataSource>
        <asp:HiddenField ID="hidCheckedRows" runat="server" ClientIDMode="Static" />
        <asp:GridView ID="GridCustomer" runat="server" CellPadding="4" ForeColor="#333333"
            DataSourceID="" ViewStateMode="Disabled" GridLines="None" AutoGenerateColumns="False"
            DataKeyNames="Id" Width="100%" AllowPaging="True" PageSize="15" OnPageIndexChanging="GridCustomer_PageIndexChanging"
            OnRowCommand="GridCustomer_RowCommand" OnRowDataBound="GridCustomer_RowDataBound"
            AllowSorting="True" OnSorting="GridCustomer_Sorting" OnRowCreated="GridCustomer_RowCreated"
            OnDataBound="GridCustomer_DataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="Seleccionar">
                    <HeaderStyle HorizontalAlign="Center" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server" CssClass="chkSelectRowHeader" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelectRow" runat="server" CssClass="chkSelectRow" onclick="javascript:window.CustomerSearchObj.HandleCheckRow(this);" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Id">
                    <HeaderStyle CssClass="displayNone" />
                    <ItemStyle CssClass="displayNone" />
                    <HeaderTemplate>
                        <span class="displayNone"></span>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <input id="hidenInputRowId_<%# Eval("Id")%>" value="<%# Eval("Id")%>" class="gridid" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Email" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Email"] %>'
                    SortExpression="Email">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Nombre" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Nombre"] %>'
                    SortExpression="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Apellido" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Apellido"] %>'
                    SortExpression="Apellido">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="TipoDocumentoId" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.TipoDocumento"] %>'
                    SortExpression="TipoDocumentoId">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Dni" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.DocumentoShort"] %>'
                    SortExpression="NroDocumento">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="EstadoEmail" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.EstadoEmail"] %>'
                    SortExpression="EstadoEmail">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="FechaUltimaCompra" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.UltimaCompraShort"] %>'
                    DataFormatString="{0:dd-MM-yyyy}" SortExpression="FechaUltimaCompra">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="OrigenId" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Origen"] %>'
                    SortExpression="OrigenId">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="OrigenPuntoDeVentaId" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.OrigenPuntoDeVentaId"] %>'
                    SortExpression="OrigenPuntoDeVentaId">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CumpleDia" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.CumpleanosDia"] %>'
                    SortExpression="CumpleDia">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CumpleMes" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.CumpleanosMes"] %>'
                    SortExpression="CumpleMes">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CumpleAnio" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.CumpleanosAnio"] %>'
                    SortExpression="CumpleAnio">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="NacionalidadId" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Nacionalidad"] %>'
                    SortExpression="NacionalidadId">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="ProvinciaId" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Provincia"] %>'
                    SortExpression="ProvinciaId">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Domicilio" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Domicilio"] %>'
                    SortExpression="Domicilio">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CodigoPostal" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.CodigoPostal"] %>'
                    SortExpression="CodigoPostal">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Estado" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Estado"] %>'
                    SortExpression="Estado">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Telefono" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Telefono"] %>'
                    SortExpression="Telefono">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="NroCredencial" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.NroCredencial"] %>'
                    SortExpression="NroCredencial">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="AuditFechaCreacion" HeaderText='<%$ Code:  LocalizationProvider.Instance["Auditoria.FechaCreacion"] %>'
                    DataFormatString="{0:dd-MM-yyyy}" SortExpression="AuditFechaCreacion">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Sexo" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Sexo"] %>'
                    SortExpression="Sexo">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="AuditUserNameCreacion" HeaderText='<%$ Code:  LocalizationProvider.Instance["Auditoria.UsuarioCreador"] %>'
                    SortExpression="AuditUserNameCreacion">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CategoriasDisplay" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Categoria"] %>' >
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                 <asp:BoundField DataField="CantidadHijos" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.CantidadHijos"] %>' 
                 SortExpression="CantidadHijos">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                 <asp:BoundField DataField="EdadHijoMenor" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.EdadHijoMenor"] %>'
                 SortExpression="EdadHijoMenor" >
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <div class="gridEngine">
                            <div id="gridEngineMenu_<%# Eval("Id")%>" class='gridEngineMenu'>
                                <asp:Panel ID="label_cmd" runat="server" CssClass="label_cmd">
                                    <img src="/Images/engineSmall.png" alt="" />
                                </asp:Panel>
                                <asp:Panel ID="pnlEngineCommand" runat="server" CssClass="menu_cmd">
                                </asp:Panel>
                            </div>
                        </div>
                        <script type="text/javascript">
                            new AdEngineDownMenu('gridEngineMenu_<%#Eval("Id") %>');
                        </script>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"
                CssClass="gridSortingHeader" />
            <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" CssClass="gridSortingHeader" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" CssClass="gridSortingHeader" />
        </asp:GridView>
        <a id="lnkWizardCmd" href="javascript:void()" onclick="window.CustomerSearchObj.showDialogCmd(); return false;"
            class="lnkCmd" runat="server">
            <asp:Literal ID="Literal25" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.AplicarOperacionMasiva"]%>' /></a>
    </asp:Panel>
    <div class="clear">
    </div>
    <asp:Panel ID="pnlGridWizard" runat="server" ClientIDMode="Static" CssClass="generalwizard_menu_cmd displayNone"
        title="Seleccione Una Opción">
        <asp:Panel ID="pnlGridWizardMenu" runat="server" ClientIDMode="Static" CssClass="menu_cmd">
            <asp:CheckBox ID="chkPnlGridWizardMenuAplicarATodoElFiltro" CssClass="gridWizardMenuChkAllRecords" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdAplicarATodosLosRegistros"] %>' />
            <%-- <asp:LinkButton ID="lnkGridWizardCmd1" runat="server" ClientIDMode="Static" CssClass="menu_item_cmd">Cargar Planilla</asp:LinkButton>--%>
            <%-- <a href="#" class="menu_item_cmd">Ejemplo</a> <a href="#" class="menu_item_cmd">Ejemplo</a>      --%>
        </asp:Panel>
    </asp:Panel>
    <asp:LinkButton ID="lnkDummyRefreshSelectedGridChecks" CssClass="displayNone lnkDummyRefreshSelectedGridChecks"
        runat="server" OnClick="lnkDummyRefreshSelectedGridChecks_Click"></asp:LinkButton>
    <%--Columnas ordenables--%>
    <asp:Panel ID="sorteableColumnsDiv" runat="server" ClientIDMode="Static" CssClass="sorteableColumnsDiv displayNone"
        title='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.OrdenarColumnasTitulo"] %>'>
        <asp:Repeater ID="repeaterColumnOrderSelector" runat="server" OnItemDataBound="repeaterColumnOrderSelector_ItemDataBound">
            <HeaderTemplate>
                <ul id="sortable" class="sorteableUl">
            </HeaderTemplate>
            <FooterTemplate>
                </ul>
            </FooterTemplate>
            <ItemTemplate>
                <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
                    <asp:CheckBox ID="chkRepeater" Text="" runat="server" Checked="true" TextAlign="Right" />
                </li>
            </ItemTemplate>
        </asp:Repeater>
        <div>
            <asp:LinkButton ID="lnkAplicarOrdenColumnas" runat="server" ClientIDMode="Static"
                CssClass="lnkAplicarOrdenColumnas" OnClick="lnkAplicarOrdenColumnas_Click" OnClientClick="return window.CustomerSearchObj.aplicarOrdenEnColumnas();">
                <asp:Literal ID="Literal26" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdAplicarCambiosEnColumnas"]%>' /></asp:LinkButton>
            <asp:LinkButton ID="lnkMostrarColumnasDefault" ClientIDMode="Static" runat="server"
                CssClass="lnkAplicarOrdenColumnasOriginal" OnClientClick="return window.CustomerSearchObj.aplicarOrdenEnColumnasOriginal();">
                <asp:Literal ID="Literal27" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdAplicarCambioOriginalEnColumnas"]%>' /></asp:LinkButton>
            <div class="clear">
            </div>
        </div>
    </asp:Panel>
    <asp:HiddenField ID="hidOrdenDeColumnas" runat="server" ClientIDMode="Static" />

    <asp:Panel ID="pnlSearchProduct" runat="server" ClientIDMode="Static" CssClass="displayNone"
        title='<%$ Code: LocalizationProvider.Instance["Bo.ProductoSearch.FilterTitle"]%>' width="100%" height="100%" ScrollBars="None">
        <iframe id="iframeSearchProduct" src="/App/ProductoSearch.aspx" width="100%" height="100%" frameborder="0"></iframe>

        </asp:Panel>

    <script type='text/javascript'>

        $(document).ready(function () {

            if (!window.AppCommonObj) {
                window.AppCommonObj = new AppCommon();
            }

            //$('input[title]').inputHints();
            if (!window.CustomerSearchObj) {
                window.CustomerSearchObj = new CustomerSearch();
            }

            if (!window.SearchProductJsObj) {
                window.SearchProductJsObj = new SearchProductJs();
            }

            $(function () {
                $(".sorteableUl").sortable();
                $(".sorteableUl").disableSelection();
            });

            // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
            $("#dialog:ui-dialog").dialog("destroy");

            $("#sorteableColumnsDiv").dialog({
                height: 'auto',
                autoOpen: false,
                width: '500',
                modal: true
                //close: window.CustomerSearchObj.aplicarOrdenEnColumnas
            });           

            $('#lstMasFiltros').dropdownchecklist(
             { icon: {},
                 width: 250,
                 onItemClick: function (checkbox, selector) {
                     window.CustomerSearchObj.HandleFilterClick(checkbox, selector);
                 }
             });

            $('#lstOrigenContacto').dropdownchecklist(
             { icon: {},
                 width: 250,
                 onItemClick: function (checkbox, selector) {
                     window.CustomerSearchObj.HandleOrigenClick(checkbox, selector);
                 }
             });

            $('.searchLst').dropdownchecklist(
             { icon: {},
                 width: 250,
                 maxDropHeight: 200
             });

            $('#txtFechaCompraDesde').datepick({ dateFormat: 'dd/mm/yyyy' });
            $('#txtFechaCompraHasta').datepick({ dateFormat: 'dd/mm/yyyy' });

            $('#txtFechaCreadoDesde').datepick({ dateFormat: 'dd/mm/yyyy' });
            $('#txtFechaCreadoHasta').datepick({ dateFormat: 'dd/mm/yyyy' });

            $('#txtCumpleDesde').datepick({ dateFormat: 'dd/mm/yyyy' });
            $('#txtCumpleHasta').datepick({ dateFormat: 'dd/mm/yyyy' });

            window.CustomerSearchObj.RefreshSelectPanel('lstMasFiltros');

            window.AppCommonObj.initializeEnterKeyEvent($('#resultDiv'), function () {
                __doPostBack($('#lnkBuscar').attr('aspnetid'), '');
            });

            $('.chkSelectRowHeader').change(function () {
                window.CustomerSearchObj.ToggleSelectAllRows();
            });

            $('#pOrigenPuntoVenta').toggle(false);

            $('.threestatecheck').threeStateCheckBox();

            window.SearchProductJsObj.Initialize($('#imgProductoSearchForceMenu'), $('#txtProductoMultipleSearch'));

            $("#pnlGridWizard").parent().appendTo($("form:first"));

        });        

    </script>
</asp:Content>
